package com.hc.middleware.mybatis;

/**
 * <h1></h1>
 *
 * @Classname DefaultSqlSessionFactory
 * @Description
 * @Date 2022/6/1 下午10:44
 * @Created by idiotHU
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private final Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration.connection, configuration.mapperElement);
    }

}

